CONTENTS | INDEX | PREV | NEXT
 remove

 NAME
  remove - delete a file

 SYNOPSIS
  #include <stdio.h>

  int error = remove(filename);
  const char *filename;

 FUNCTION
  remove() deletes the specified file path returning 0 on success,
  a negative number on failure.

  On the Amiga, an error will occur if you try to delete a file
  currently openned by yourself or any other process.

  remove() is an ANSI function.  unlink() does the same thing but
  is a UNIX compatible function.

 EXAMPLE
  /*
   *  delete the file 'T:xxx'
   */

  #include <stdio.h>

  main()
  {
      int error = remove("T:XXX");

      if (error < 0) {
      perror("remove("T:XXX") failed");
      exit(1);
      }
      puts("T:XXX has been deleted");
      return(0);
  }

 INPUTS
  char *filename;     filename to delete

 RESULTS
  int error;      0 on success, a negative number on failure

 SEE ALSO
  unlink